<template>
	<view style="display: flex; flex-direction: column; align-items: center; padding-top:20vh ;">
		<!-- <u-navbar :borderBottom="false" back-text=" " :title="title"></u-navbar> -->
		<!-- <u-navbar :is-back="true" back-text=" " :title-color="style.color5" :background="{background:style.color2}"
			:title-size="30" :title-width="400" :title="title"></u-navbar> -->
		<back title="邀请客户"></back>
		<view class="code_box">
			<view class="code_top">
				进入我的商城
			</view>
			<view class="code_bgc">
				<view class="" style="padding: 20rpx; background-color: #fff; border-radius: 20rpx;">
					<uv-qrcode ref="qrcode" size="210px" :value="img"></uv-qrcode>
				</view>
			</view>
		</view>
		<!-- <image :src="img" mode="widthFix" style="width: 70vw;"></image> -->
		<view class="submit_box1">
			<view class="submit_box2" @click="save()">
				二维码保存
			</view>
		</view>
	</view>
</template>

<script>
	import back from '@/componts/back.vue';
	export default {
		components: {
			back
		},
		data() {
			return {
				info: null,
				img: '',
				style: {}
			}
		},
		onLoad(data) {
			this.title = '邀请客户'
		},
		onShow() {
			this.getInfo()
			var style = uni.getStorageSync('style')
			style = JSON.parse(style)
			this.style = style
		},


		methods: {
			getInfo() {
				var data = {

				}
				this.$wqzApi.UserDealer_share(data).then(res => {

					this.img = res.data
				})
			},
			save() {
				this.$refs.qrcode.save({
					success: (res) => {
						console.log(res);
					}
				});
			},


		}
	}
</script>
<style lang="scss" scoped>
	@import url(./Apply_distribution.css);
</style>